<template>
	<view class="u-padding-20">
		<video :src="video" v-if="video" style="width: 100%;"></video>
			<u-parse :html="content"></u-parse>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				content:"",
				video:""
				
			}
		},
		onLoad(options) {
			if(options.id){
				if(options.id==1){
					uni.setNavigationBarTitle({
						title:"加盟中心"
					})
				}
				if(options.id==2){
					uni.setNavigationBarTitle({
						title:"洗车使用说明"
					})
				}
				if(options.id==3){
					uni.setNavigationBarTitle({
						title:"用户充值协议"
					})
				}
				
				if(options.id==6){
					uni.setNavigationBarTitle({
						title:"用户隐私协议"
					})
				}
				
				this.$u.post('/api/index/detail', {
				     article_id:options.id
				}).then(res => {
					if(res.video){
						this.video=res.video
					}
					this.content=res.detail
				}).catch(err => {
				
				})
			}
			console.log(options)
		}
	}
</script>

<style>
</style>
